import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const breadDataArr = []

export default new Vuex.Store({
  state: {
    activeIndex:'/',
    clearHeight:false,
    clearBG:false,
    // breadData:[]
  },
  mutations: {
    changeActiveIndex(state,payload){
      let {key,path} = payload
      state.activeIndex = key+''
      // window.scroll(0, 0)
    },
    changeNavStatus(state,payload){
      state.clearHeight = payload
      state.clearBG = payload
    },
  //   getBreadData(state,payload){
  //     let breadData = breadDataArr.filter(item=>item.path === payload)
  //     if(breadData && breadData[0]) state.breadData = breadData[0].breadData
  //   }
  },
  actions: {
  },
  modules: { 
  }
})